<script>
navigator.serviceWorker.getRegistration().then(r =>
  console.log("getRegistration finished"));
</script>
